package org.xqp.hrm.feign.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.xqp.hrm.domain.Login;
import org.xqp.hrm.dto.LoginMealDto;
import org.xqp.hrm.util.AjaxResult;

@RequestMapping("/login")
@FeignClient(value = "hrm-service-auth", fallbackFactory = LoginFeignClientFallbackFactor.class)
public interface LoginFeignClient {

    // 这是feign接口要和调用的类的方法一样  然后我们这里是要做Login的保存这里的方法要和Login保存一样
    @RequestMapping(value="/save",method= RequestMethod.POST)
    AjaxResult save(@RequestBody Login login);

    // 这是feign接口要和调用的类的方法一样  然后我们这里是要做Login的保存和login和套餐的中间表的保存
    @RequestMapping(value="/saveLoginAndMeal",method= RequestMethod.POST)
    AjaxResult saveLoginAndMeal(@RequestBody LoginMealDto loginMealDto);
}
